extends "../bisimai-1/bisimai-1.gd"


func _extInit():
	._extInit()
	lv = 2             #等级的设置
	addSkill("我方赤色中轴阵营角色提高20%血量及吸血", "铁血宰相")
	
func _onBattleStart():
	._onBattleStart()
	for i in getAllChas(2):
		if i.camp != "赤色中轴":continue
		castBuff(i, b_bisimai2.new())

class b_bisimai2:
	extends "../../../../azurlane_ctrl/AzurBuff.gd"
	func _init():
		attInit()
		id = "b_bisimai2"
		att.suck = 0.2
		att.maxHpL = 0.2
		buffName = "铁血宰相"
		dispel = 2
	func _connect():
		if casCha.lv < 3:return
		masCha.connect("onHurtDeath", self, "onHurtDeath")
		if casCha.upgraded == 1:
			att.defL = 0.2
	var flag = true
	func onHurtDeath(atkInfo):
		if atkInfo.hurtChaDead and flag:
			flag = false
			atkInfo.hurtChaDead = false
			masCha.addBuff(buff.b_wudi.new(2))
			casCha.healCha(masCha, masCha.att.maxHp*0.5)